﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Input;

namespace BalanceManager.UIControls
{
    public class CurrencyTextBox : TextBox
    {
        public CurrencyTextBox()
        {
            this.InputScope = new InputScope();
            this.InputScope.Names.Add(new InputScopeName() { NameValue = InputScopeNameValue.CurrencyAmount });
        }

        protected override void OnKeyDown(KeyEventArgs e)
        {
            if (e.Key == Key.Decimal || e.PlatformKeyCode == 190)
            {
                e.Handled = true;
            }
            base.OnKeyDown(e);
        }
    }
}
